{% extends 'base.html' %}
{% block title %}赞助本站{% endblock %}
{% block content %}
<div class="container py-4">
  <h2 class="mb-3">赞助本站</h2>
  <p>感谢您的支持！您的每一份赞助都将帮助本站持续运营与发展。</p>
  <div class="mb-3">
    <a href="https://afdian.com/a/GPM_and_LP_Mod" target="_blank" class="btn btn-success">前往爱发电主页</a>
  </div>
  <div class="mb-4">
    <div style="width:100%;max-width:480px;margin:auto;">
      <iframe id="afdian-iframe" src="https://afdian.com/widget/card?uid=GPM_and_LP_Mod" frameborder="0" scrolling="no" style="width:100%;min-height:600px;" allowtransparency="true"></iframe>
    </div>
  </div>
  <script>
    document.addEventListener('DOMContentLoaded', function() {
      var iframe = document.getElementById('afdian-iframe');
      function resizeIframe() {
        if (iframe && iframe.contentWindow) {
          iframe.style.height = iframe.contentWindow.document.body.scrollHeight + 'px';
        }
      }
      iframe.onload = resizeIframe;
    });
  </script>
  <div class="card mt-4">
    <div class="card-header">感谢名单</div>
    <div class="card-body">
      <ul class="mb-0">
        <li>（您的名字可以出现在这里！）</li>
      </ul>
      <p class="mt-2 text-muted" style="font-size:0.95em;">如您已赞助且希望展示昵称，请联系站长。</p>
    </div>
  </div>
  <div class="alert alert-info mt-4" role="alert">
    <strong>赞助说明：</strong> 赞助仅用于服务器、域名等基础运营支出，不影响任何功能使用。感谢您的理解与支持！
  </div>
{% endblock %}
